<?php
namespace App\Http\Controllers\TenantCentral;

use Spatie\RouteAttributes\Attributes\Any;
use Spatie\RouteAttributes\Attributes\Prefix;

/**
 * @author jiangyong<jiangyong.go@qq.com>
 * @date   2025/5/19 13:19
 */

#[Prefix('tenant-central')]
class Manage extends \App\Http\Controllers\Controller
{

    #[Any('add')]
    public function add()
    {
        $tenant1 = \App\Models\Tenant::create(['id' => 'foo']);
        $tenant1->domains()->create(['domain' => 'foo.lar.loc']);

        //$tenant2 = App\Models\Tenant::create(['id' => 'bar']);
        //$tenant2->domains()->create(['domain' => 'bar.localhost']);

//        $tenant = Tenant::create([
//            'id' => 'tenant1',
//            'domain' => 'tenant1.test',
//        ]);
    }
}
